﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MainSite.Master" AutoEventWireup="true"
    CodeBehind="Administradores.aspx.cs" Inherits="ShoppingCart.WebSite.Admin.Administradores" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cpHead" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpContent" runat="server">
    <div class="block">
        <div class="block_head">
            <div class="bheadl">
            </div>
            <div class="bheadr">
            </div>
            <h2>
                Listado de Administradores</h2>
        </div>
        <div class="block_content">
            <asp:UpdatePanel ID="upnActualizar" runat="server">
                <ContentTemplate>
                    <br />
                    <asp:ListView ID="lvAdministradores" runat="server" InsertItemPosition="FirstItem"
                        OnItemCanceling="LvAdministradoresItemCanceling" OnItemCommand="LvAdministradoresItemCommand"
                        OnItemDeleting="LvAdministradoresItemDeleting" OnItemEditing="LvAdministradoresItemEditing"
                        OnItemInserting="LvAdministradoresItemInserting" OnItemUpdating="LvAdministradoresItemUpdating">
                        <ItemTemplate>
                            <tr style="background-color: #F7F7F7; color: #333333;">
                                <td>
                                    <asp:LinkButton ID="lkbEditar" runat="server" CausesValidation="False" CommandName="Edit"
                                        ToolTip="Modificar">
                                            <img src="Style/images/update.png" alt="Editar" /></asp:LinkButton>
                                    <asp:LinkButton ID="lkbEliminar" runat="server" CausesValidation="False" CommandName="Delete"
                                        CommandArgument='<%# Eval("Username") %>' ToolTip="Eliminar" OnClientClick="javascript:return confirm('¿Esta seguro de Eliminar el Admnistrador?')">
                                                <img src="Style/images/delete.gif" alt="Eliminar" /></asp:LinkButton>
                                </td>
                                <td>
                                    <asp:Label ID="lblProducto" runat="server" Text='<%# Eval("Username") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblCantidad" runat="server" Text='<%# Eval("Email") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblPrecio" runat="server" Text='<%# Eval("CreationDate", "{0:d}") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblDescuento" runat="server" Text='<%# Eval("LastLoginDate", "{0:d}") %>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr style="background-color: #FFFFFF; color: #284775;">
                                <td>
                                    <asp:LinkButton ID="lkbEditar" runat="server" CausesValidation="False" CommandName="Edit"
                                        ToolTip="Modificar">
                                            <img src="Style/images/update.png" alt="Editar" /></asp:LinkButton>
                                    <asp:LinkButton ID="lkbEliminar" runat="server" CausesValidation="False" CommandName="Delete"
                                        CommandArgument='<%# Eval("Username") %>' ToolTip="Eliminar" OnClientClick="javascript:return confirm('¿Esta seguro de Eliminar el Administrador?')">
                                                <img src="Style/images/delete.gif" alt="Eliminar" /></asp:LinkButton>
                                </td>
                                <td>
                                    <asp:Label ID="lblProducto" runat="server" Text='<%# Eval("Username") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblCantidad" runat="server" Text='<%# Eval("Email") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblPrecio" runat="server" Text='<%# Eval("CreationDate", "{0:d}") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblDescuento" runat="server" Text='<%# Eval("LastLoginDate", "{0:d}") %>' />
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                        <EmptyDataTemplate>
                            <table id="Table1" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                                border-color: #999999; border-style: none; border-width: 1px;">
                                <tr>
                                    <td>
                                        No se han registrado ningun Administrador.
                                    </td>
                                </tr>
                            </table>
                        </EmptyDataTemplate>
                        <InsertItemTemplate>
                            <tr style="">
                                <td>
                                    <asp:LinkButton ID="lkbNuevo" runat="server" CommandName="Insert" ValidationGroup="Insert"
                                        ToolTip="Agregar">
                                                <img src="Style/images/new.png" alt="Agregar" /></asp:LinkButton>
                                    <asp:LinkButton ID="lkbCancelar" runat="server" CausesValidation="False" CommandName="Cancel"
                                        ToolTip="Cancelar">
                                                <img src="Style/images/cancel.png" alt="Cancelar" /></asp:LinkButton>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUsername" runat="server" Text='<%# Bind("Username") %>' ValidationGroup="Insert"
                                        Width="80px" />
                                    <asp:RequiredFieldValidator ID="rfvUsername" runat="server" ErrorMessage="*" ControlToValidate="txtUsername"
                                        ValidationGroup="Insert" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>' ValidationGroup="Insert"
                                        Width="80px" />
                                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="*" ControlToValidate="txtEmail"
                                        ValidationGroup="Insert" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPassword" runat="server" Text='<%# Bind("Password") %>' ValidationGroup="Insert"
                                        Width="80px" TextMode="Password" />
                                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="*" ControlToValidate="txtPassword"
                                        ValidationGroup="Insert" />
                                </td>
                                <td>
                                </td>
                            </tr>
                        </InsertItemTemplate>
                        <LayoutTemplate>
                            <table id="Table2" runat="server">
                                <tr id="Tr1" runat="server">
                                    <td id="Td1" runat="server">
                                        <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;
                                            border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
                                            font-family: Verdana, Arial, Helvetica, sans-serif;">
                                            <tr id="Tr2" runat="server" style="background-color: #F7F7F7; color: #333333;">
                                                <th id="Th1" runat="server">
                                                </th>
                                                <th id="Th2" runat="server">
                                                    USERNAME
                                                </th>
                                                <th id="Th3" runat="server">
                                                    E-MAIL
                                                </th>
                                                <th id="Th4" runat="server">
                                                    FECHA CREACION
                                                </th>
                                                <th id="Th6" runat="server">
                                                    ULTIMO ACCESO
                                                </th>
                                            </tr>
                                            <tr id="itemPlaceholder" runat="server">
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </LayoutTemplate>
                        <EditItemTemplate>
                            <tr style="background-color: #999999;">
                                <td>
                                    <asp:LinkButton ID="lkbUpdate" runat="server" CausesValidation="False" CommandName="Update"
                                        CommandArgument='<%# Eval("Username") %>' ValidationGroup="Update" ToolTip="Actulizar">
                                                <img src="Style/images/ok.png" alt="Actualizar" /></asp:LinkButton>
                                    <asp:LinkButton ID="lkbCancelar" runat="server" CausesValidation="False" CommandName="Cancel"
                                        ToolTip="Cancelar">
                                                <img src="Style/images/cancel.png" alt="Cancelar" /></asp:LinkButton>
                                </td>
                                <td>
                                    <asp:Label ID="lblProducto" runat="server" Text='<%# Eval("Username") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>' ValidationGroup="Insert"
                                        Width="80px" />
                                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="*" ControlToValidate="txtEmail"
                                        ValidationGroup="Insert" />
                                </td>
                                <td>
                                </td>
                            </tr>
                        </EditItemTemplate>
                    </asp:ListView>
                    <asp:Literal ID="litMensaje" runat="server"></asp:Literal>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div class="bendl">
        </div>
        <div class="bendr">
        </div>
    </div>
</asp:Content>
